1. Field of the Invention
The present invention relates to a card controller and a memory card. For example, the present invention relates to a card controller that controls a semiconductor memory including memory cells each having a charge accumulation layer and a control gate.
2. Description of the Related Art
In recent years, the rapid growth of digital cameras and portable audio players has increased demand for large-capacity nonvolatile semiconductor memories. NAND flash memories (hereinafter sometimes simply referred to as flash memories) have been extensively used as nonvolatile semiconductor memories.
In the NAND flash memory, data in a plurality of memory cells are erased at a time. This erase unit is hereinafter referred to as a memory block. The characteristics of the NAND flash memory prevent overwriting of data. Consequently, for data updating, it is necessary to write new data to an erase memory block, while copying the other data in a memory block holding the non-updated data to the erase memory block (this process is sometimes called copying). Thus, even if an amount of data smaller than the size of a memory block needs to be updated, the data must be written to the erase memory block in memory block units.
Thus, to write a small amount of data, a known method uses a memory block different from the one to which the data is to be originally written, as a cache (see, for example, Jpn. Pat. Appln. KOKAI Publication No. 2006-18471). However, to write data already written to the cache back to the original memory block, this method must also write the data in memory block units. Thus, disadvantageously, data update takes a long time.